home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 121_01 / if.doc < prev    next >
Text File  |  1985-08-19  |  2KB  |  68 lines

  1.  
  2.      IF (1)                    BDS C Users' Group                    IF (1)
  3.  
  4.  
  5.  
  6.      NAME        NAME 
  7.           if - conditionally execute programs 
  8.  
  9.      SYNOPSIS        SYNOPSIS 
  10.           if                                                if <condition> command arg1 arg2 ...  
  11.  
  12.      DESCRIPTION        DESCRIPTION 
  13.           __                                                                    If is a program which executes any other program (passing 
  14.           command line arguments if specified) when a conditional test 
  15.           is met.  
  16.  
  17.           The following conditions may be tested:
  18.           _________               ____ ___            Condition               When met
  19.           -r filename             filename is readable, i.e. exists
  20.           -w filename             filename is writeable, i.e. not marked R/O
  21.           !(-r) filename          filename is not readable, i.e. does not exist
  22.           !(-w) filename          filename is not writeable, i.e. is marked R/O
  23.           str1 == str2            string 'str1' is the same as string 'str2'
  24.           str1 != str2            string 'str1' is different from string 'str2'
  25.  
  26.      CAVEATS        CAVEATS 
  27.           This program was tested with v1.50 of the BDS C compiler 
  28.           under CP/M 2.2.  It should work with other versions of BDS C 
  29.           and CP/M, but has not been tested.  
  30.  
  31.      EXAMPLES        EXAMPLES 
  32.           if -r a:data pip b:=a:data    if file 'a:data' exists, use pip to
  33.                                         copy it to drive B
  34.           if $1 == link clink $2 -n     if this is a line in a submit file
  35.                                         'test.sub', then:
  36.                                         'submit test link abc' will clink abc
  37.                                         'submit test lunk abc' won't clink abc
  38.  
  39.      SEE ALSO        SEE ALSO 
  40.           sh(1) 
  41.  
  42.      BUGS        BUGS 
  43.           You can't run any of the builtin commands (DIR, ERA, REN, 
  44.                                  __               SAVE, TYPE, USER) from if.  
  45.  
  46.      NOTES        NOTES 
  47.           Requires local.c for link.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                                       -1-
  66.  
  67.           This program was tested with v1.50 of the BDS C compiler